<!DOCTYPE html>
<html lang="zh">
<head>
    <title>{{.Config.Name}}</title>
    
    <!-- Meta -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta name="Keywords" content="梅宝博客,鳄宝,开源硬件,开源软件,前端,后端">
	<meta name="description" content="这是一个使用Go语言开发的博客，这里即包含开源软件又包含了开源硬件，主要记录和分享自身的经验。注：这真的是我的真名">
	<meta name="template" content="模版来自于 https://sc.chinaz.com/moban/190715005240.htm">
    <meta name="author" content="梅宝">
<!--    <link rel="shortcut icon" href="favicon.ico"> -->
    
    <!-- FontAwesome JS-->
{{/*    <script defer src="static/assets/js/all.js"></script>*/}}
    
    <!-- Theme CSS -->  
    <link id="theme-style" rel="stylesheet" href="static/assets/css/theme-6.css">
    <link id="theme-style" rel="stylesheet" href="{{ .Config.RootUrl}}static/assets/plugins/font-awesome/css/font-awesome.min.css">

</head> 

<body>

	{{ render "header.html" }}
    
    <div class="main-wrapper">
	    <section class="cta-section theme-bg-light py-5">
		    <div class="container text-center">
			    <h2 class="heading">你好，欢迎访问</h2>
			    <div class="intro">可使用下方搜索功能快速找到对应的博文，如遇到喜欢的请直接收藏博文地址</div>
			    <form class="signup-form form-inline justify-content-center pt-3" action="{{ .Config.RootUrl}}search/?page=1">
                    <div class="form-group">
                        <label class="sr-only" for="search">标题搜索</label>
                        <input type="text" id="search" name="k" class="form-control mr-md-1 semail" placeholder="请输入标题搜索">
                    </div>
                    <button type="submit" class="btn btn-primary">点击搜索</button>
                </form>
		    </div><!--//container-->
	    </section>
	    <section class="blog-list px-3 py-5 p-md-5">
		    <div class="container">
				{{if gt .articleLen 0}}
					{{range $item := .articles}}
					<div class="item mb-5">
						<div class="media">
							<img class="mr-3 img-fluid post-thumb d-none d-md-flex" style="border-radius: 11px" src="{{$item.Img}}" alt="image">
							<div class="media-body">
								<h3 class="title mb-1"><a href="article/{{$item.Id}}?menuid={{$item.MenuId}}">{{$item.Title}}</a></h3>
								<div class="meta mb-1"><span class="date">{{$item.CreateTime}}</span><span class="comment"><a>{{$item.Hits}} 次浏览</a></span></div>
								<div class="intro">{{$item.Desc}}...</div>
								<a class="more-link" href="article/{{$item.Id}}?menuid={{$item.MenuId}}">查看详情 &rarr;</a>
							</div><!--//media-body-->
						</div><!--//media-->
					</div><!--//item-->
					{{end}}
				{{else}}
					<div style="display: flex;flex-direction: column;align-items: center">
						<div><img src="{{ .Config.RootUrl}}static/assets/images/none.png" style="width: 200px;height: 200px" alt="暂无内容"></div>
						<div>暂无内容</div>

					</div>
				{{end}}

			    <nav class="blog-nav nav nav-justified my-5">
					<a class="nav-link-prev nav-item nav-link rounded-left" href="{{ .Config.RootUrl}}list?page={{ .PrevPage}}">上一页<i class="arrow-prev fas fa-long-arrow-alt-left"></i></a>
					<a class="nav-link-next nav-item nav-link rounded-right" href="{{ .Config.RootUrl}}list?page={{ .NextPage}}">下一页<i class="arrow-next fas fa-long-arrow-alt-right"></i></a>
				</nav>
{{/*				{{if gt .articleLen 6}}{{end}}*/}}

		    </div>
	    </section>
		{{ render "foot.html" }}
    </div><!--//main-wrapper-->

       
    <!-- Javascript -->          
    <script src="static/assets/plugins/jquery-3.3.1.min.js"></script>
    <script src="static/assets/plugins/popper.min.js"></script>
    <script src="static/assets/plugins/bootstrap/js/bootstrap.min.js"></script>

    <!-- Style Switcher (REMOVE ON YOUR PRODUCTION SITE) -->
    <script src="static/assets/js/demo/style-switcher.js"></script>
    

</body>
</html> 

